import request from '@/utils/request'
function getUrl(url) { return '/api/' + url }


// 新增设备维保周期
export function addInCycle(data) {
    return request({
        url: getUrl('/admin/inMaintenanceCycle/add'),
        method: 'post',
        data
    })
}

// 查询设备维保周期详情
export function getInCycle(value) {
    return request({
        url: getUrl('/admin/inMaintenanceCycle/' + value),
        method: 'get'
    })
}

// 修改设备维保周期
export function updateInCycle(data) {
    return request({
        url: getUrl('/admin/inMaintenanceCycle/update'),
        method: 'put',
        data
    })
}

// 删除字典类型
export function deleteCycle(cycleId) {
    return request({
        url: getUrl('/admin/inMaintenanceCycle/' + cycleId),
        method: 'delete'
    })
}


// 查询设备维保周期
export function getCycleList(data) {
    return request({
        url: getUrl('/admin/inMaintenanceCycle/getCycleList'),
        method: 'get',
        data
    })
}
